1. Field of Invention
The present invention relates to motion detection used in connection with deinterlacing fields of an interlaced video signal.
2. Discussion of Related Art
Video images are displayed on monitors or display screens of various types as a time-sequence of frames shown quickly enough to deceive the human eye into perceiving that sequence of frames as a continuously moving picture. Each frame consists of a collection of lines of pixels, the precise number of which depend on the technology implemented. For historical reasons, for example reasons which took advantage of older technologies to reduce perceived flicker arising from such an arrangement, each frame was further divided into two fields, each of which contained half of the lines comprising the frame. One field contained every other line of the frame, e.g. the even lines, and the other field contained the lines not included in the first field, e.g. the odd lines. Fields were displayed in even, odd, even, odd, etc. sequence, at twice the frame rate, thus reducing flicker and displaying the sequence of frames at the frame rate. Such an arrangement of fields to form frames is referred to as an interlaced scan display.
Another way of displaying frames is to simply display each line of a frame in sequence, and with such timing as to display frames at the desired frame rate. Such an arrangement of display is referred to as a progressive scan display.
When video images are broken down into a sequence of serial elements so as to form a serial signal that can be transmitted from a video image source to a video image display, the two-field arrangement is conventionally still used. Therefore, video image display devices that employ progressive scan display de-interlace the signal so it can then be used to produce entire fields at one time.
In conventional deinterlacer devices, for example, the Supra HD780 available from Zoran Corporation, frame motion detection is used as shown in FIG. 1. Conventional frame motion detection compares fields of the same polarity, i.e., even-even or odd-odd.
A video image stream 101 is loaded into a buffer 103. At time t−1, frame motion detection is performed by a detector 105 between Field 0 and Field 2. A motion value 107 is computed for each corresponding pair of pixels based on a finite window of pixels around that for which the value is being computed. This motion value is then quantized into a 2-bit motion value, k, by comparing a quantitative measure of motion detected to thresholds. This motion value, k, is then written to memory 109, which would be read back at time t. Also at time t−1, motion values 108 representing motion detected between Field 1 and Field 3 which were previously computed and stored in memory 109, or simultaneously computed by detector 111 and stored in memory 109 are read from memory 109. Hence, at time t−1, two motion values are available. Conventionally, one frame motion detector (frame motion detector 1-3) 111 detects motion between field 1 and field 3, while another (frame motion detector 0-2) 105 detects motion between field 0 and field 2. (See also FIG. 2). A goal of this process is to predict the values of pixels in a frame which are not part of the current field, i.e., the current missing pixels.
Processing by a processor 113, then proceeds as follows: The buffer 103 is read out 115 and an output stream 117 either weaved or interpolated are described. To calculate the final k value for a particular current missing pixel, the following is done:
Let k13_top=k value from pixel immediately above the current missing pixel from frame motion detector 13
Let k13_bot=k value from pixel immediately below the current missing pixel from frame motion detector 13
Let k02=k value calculated from frame motion detector 02
if (k13_top > k02 && k13_bot > k02)  k_final = max(k13_top, k13_bot)else  k_final = k02end.
The current design suffers from motion aliasing, i.e. there is undetected motion. This results in feathering artifacts.
In the Supra HD780, the frame motion detector uses a 3-line by 5-pixel wide window to calculate the Mean Absolute Difference (MAD) as the frame motion value for each pixel.
The MAD of a pixel in missing row i, column j, at time t is calculated between the future and the past fields as follows:
      MAD    ⁡          (              i        ,        j        ,        t            )        =                              ∑                      k            =                          -              1                                1                ⁢                                  ⁢                              ∑                          l              =                              -                2                                      2                    ⁢                                                                p                ⁡                                  (                                                            i                      +                      k                                        ,                                          j                      +                      l                                        ,                                          t                      +                      1                                                        )                                            -                              p                ⁡                                  (                                                            i                      +                      k                                        ,                                          j                      +                      l                                        ,                                          t                      -                      1                                                        )                                                                                    16        .  
The motivation for utilizing a 3×5 window is to suppress the effects of noise.
However, because such a big window is used for motion detection, motion that is far away from the missing pixel will affect the amount of motion detected at the missing pixel, resulting in the detection of motion where there is none.
The MAD values computed by the motion detector are compared to 3 programmable thresholds to create a 2-bit ‘k’ value:
  kframe  =      {                                        0            ,                                                            ⁢                          if              ⁢                                                          ⁢                              (                                  MAD                  ≤                                      reg_frame                    ⁢                    _mdetect                    ⁢                    _thresh                    ⁢                    _a                                                  )                                                                                      1            ,                                                            ⁢                          if              ⁢                                                          ⁢                              (                                                      MAD                    >                                          reg_frame                      ⁢                      _mdetect                      ⁢                      _thresh                      ⁢                      _a                                                        &&                                      MAD                    ≤                                                                                                                                                                                    ⁢                          reg_frame              ⁢              _mdetect              ⁢              _thresh              ⁢              _b                        )                                                            2            ,                                                            ⁢                          if              ⁢                                                          ⁢                              (                                                      MAD                    >                                          reg_frame                      ⁢                      _mdetect                      ⁢                      _thresh                      ⁢                      _b                                                        &&                                      MAD                    ≤                                                                                                                                                                                    ⁢                          reg_frame              ⁢              _mdetect              ⁢              _thresh              ⁢              _c                        )                                                            3            ,                                                            ⁢                          if              ⁢                                                          ⁢                              (                                  MAD                  >                                      reg_frame                    ⁢                    _mdetect                    ⁢                    _thresh                    ⁢                    _c                                                  )                                                                                                                                                  ⁢                                          reg_frame                ⁢                _mdetect                ⁢                _thresh                ⁢                _a                            ≤                                                                                                                                    ⁢                                          reg_frame                ⁢                _mdetect                ⁢                _thresh                ⁢                _b                            ≤                                                                                                                                    ⁢                          reg_frame              ⁢              _mdetect              ⁢              _thresh              ⁢              _c                                          
This final result from (‘k’ value) is used by the output blender to generate the missing lines of the output frame, at each field time. The output frame is either weaved from successive odd/even field, interpolated from a single field, or a combination of the two. If motion in the scene is significant, weaving between fields is more likely to produce a field tearing artifact. A 2-bit ‘k’ motion value allows for four blending ratios in the output blender. The values currently used are summarized in the table below:
‘k’ motion valueWeave (%)Interpolate (%)01000150502257530100
The k motion value is quantized into a 2-bit value by comparing to programmable thresholds. This quantization creates quantization error. Moreover, 4-level blending creates undesired artifacts in high frequency images.
In the Supra HD780, field motion detectors detect motion on two fields of opposite polarities, in addition to frame motion detection based on fields of the same polarity. When the frame motion detection and the field motion detection disagree substantially, a recursive frame motion algorithm is used to detect motion. A counter is used to keep track of situations when the results of the frame motion detector and field motion detector conflict. The counter value is compared to a threshold (moving_threshold below) and used to modify the ‘k’ motion value.
If (k_field > threshhold) // field motion detector detects somemotion  If (k_frame == 0) // frame motion detector doesn't detect anymotion   historical_motion_counter = historical_motion_counter + 1;  Else   historical_motion_counter = historical_motion_counter − 1;Else  historical_motion_counter = 0.
The historical_motion_counter is saved on the field buffer and read on the next field.
k_curr_frame′ is modified as follow:
If (k_field > teething_threshold & historical_motion_counter <moving_threshold)  k_curr_frame′ = k_frame + 1Else if (k_prev_frame > k_curr_frame)  k_curr_frame′ = k_prev_frame − 1Else  k_curr_frame′ = k_curr_frame.k_frame is modified as follows:
If (k_field > teething_threshold & historical_motion_counter <moving_threshold)  k_frame′ = k_frame +1Else  k_frame′ = k_frame.k_frame′ can be used as the k motion value.
The recursive motion method embodies in the Supra HD780 requires a 4-bit per pixel field buffer to store the historical counter value, based on using a 2-bit k motion value. This method still produces artifacts in static high vertical frequency images, where single-time details are present.